/*
 * @Description  : 
 * @Author       : 陈韵同
 * @Date         : 2021-03-02 14:36:25
 * @LastEditTime : 2021-03-08 12:15:49
 * @LastEditors  : 陈韵同
 * @FilePath     : e:\协同云组件库\新建文件夹 (2)\新建文件夹\cloud-components\tests\unit\lib\register-context.js
 */
import Vue from 'vue'
import { ApiService, Authority } from 'cloud-common';
import { $cloudMessage, $cloudConfirm } from '../../../packages';
import { CloudLoading, CloudMessage, CloudConfirm } from "../../../packages";
import axios from 'axios';

Vue.use(CloudLoading);
Vue.use(CloudMessage);
Vue.use(CloudConfirm);

//--------  注册接口服务  ----------------
Vue.prototype.$checkAuth = new Authority('space').checkAuth;
Vue.prototype.api = new ApiService(axios, $cloudMessage, $cloudConfirm, '');
Vue.prototype.$http = axios;
//--------  注册接口服务结束  ----------------

//--------  注册全局过滤器 -------------
import filters from 'cloud-common/tool/filter.js';
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));

import registerRequireContextHook from 'babel-plugin-require-context-hook/register';
registerRequireContextHook();